import request from '@/utils/request';
import querystring from 'querystring';
// 首页获取服务包列表
export function getArticles(data) {
  // https://test-wanhuwx.wanhuhealth.com/api/wcm/articles?where=%7B%22articleType%22%3A2%2C%22articleCategory%22%3A%22%E5%81%A5%E5%BA%B7%E6%8A%A5%22%2C%22articleCategoryRange%22%3A2%7D&skip=0&limit=10&nearBy=desc
  return request({
    url: `/wcm/articles?${querystring.stringify(data)}`,
    method: 'get',
    noAuth: true,
    data: data
  });
}

// 获取文章详情
export function getArticleDetail(articleId) {
  // https://test-wanhuwx.wanhuhealth.com/api/wcm/articles?where=%7B%22articleType%22%3A2%2C%22articleCategory%22%3A%22%E5%81%A5%E5%BA%B7%E6%8A%A5%22%2C%22articleCategoryRange%22%3A2%7D&skip=0&limit=10&nearBy=desc
  return request({
    url: `/wcm/articles/${articleId}`,
    noAuth: true,
    method: 'get'
  });
}
